<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
       function x(n) {
       	  if (n === 1) {
       	  	 return 1;
       	  } else{
       	  	return n * x(n - 1);
       	  }
       }

       console.log(x(5));
	</script>
</body>
</html>